from appium.options.android import UiAutomator2Options
from appium import webdriver

capabilities = {
    "platformName": "Android",
    "appium:platformVersion": "12.0",
    "appium:deviceName": "emulator-5554",
    "appium:appPackage": "com.xueqiu.android",
    "appium:appActivity": ".view.WelcomeActivityAlias",
    "appium:noReset": True,
    "appium:dontStopAppOnReset": True,
    "appium:autoGrantPermissions": True,
    "appium:androidUIAutomator": "androidUIAutomator2",
    "appium:automationName": "UIAutomator2",
    "appium:adbExecTimeout": "80000",
}

appium_server_url = 'http://localhost:4723'


class Test_app_demo:
    def setup_class(self):
        self.driver = webdriver.Remote(appium_server_url, options=UiAutomator2Options().load_capabilities(capabilities))

    def tearDown_class(self):
        if self.driver:
            self.driver.quit()

    def test_demo(self):
        pass
